// 网卡操作列表 混合

// import _ from 'lodash'
// import {jsSleep} from '@/utils/commonUtils'

export default {
    data() {
        return {
            resolveShow: undefined,
            rejectShow: undefined,
        };
    },
    computed: {},
    methods: {
        // 获取网卡列表
        async dialogShow() {
            this.$emit('update:modelValue', true);
            return new Promise((resolve, reject) => {
                this.resolveShow = resolve;
                this.rejectShow = reject;
            });
        },
        chooseOk(args) {
            this.resolveShow && this.resolveShow(args);
            this.resolveShow = undefined;
            this.rejectShow = undefined;
        },
        chooseCancel(args) {
            if (args === 'm_cancel') {
                // this.rejectShow && this.rejectShow();
            } else {
                this.rejectShow && this.rejectShow(new Error(args));
            }
            this.resolveShow = undefined;
            this.rejectShow = undefined;
        },
    },
};
